package at.studentinformation;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;

public class StudentInformationActivity extends Activity {    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        if(!Common.isLogin)
        {
        	Intent loginIntent = new Intent(StudentInformationActivity.this, LoginActivity.class);			
        	startActivity(loginIntent);
        	finish();
        }               
        
        Common.dbManager = new DBManager(this);        
        Common.dbManager.createDataBase();
        Common.dbManager.openDataBase();
        
        startService(new Intent(getBaseContext(), StudentService.class));          
        
        final ImageButton btnGrade = (ImageButton)findViewById(R.id.btnGrade);
        final ImageButton btnSchedule = (ImageButton)findViewById(R.id.btnSchdule);                      
        
        btnGrade.setOnClickListener(new OnClickListener(){
			public void onClick(View v) {
				// TODO Auto-generated method stub					
				//Intent loginIntent = new Intent(StudentInformationActivity.this, PointActivity.class);			
	        	//startActivity(loginIntent);
	        	//finish();			
			}		
		});
        
        btnSchedule.setOnClickListener(new OnClickListener(){
			public void onClick(View v) {
				// TODO Auto-generated method stub						
			}
		});
    }
}